package com.fanshuai.springcloud.config;

import com.fanshuai.springcloud.service.BookService;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MainConfig {
    @Bean(name = "baseBookService")
    @ConditionalOnMissingBean(BookService.class)
    public BookService bookService() {
        return new BookService();
    }
}
